Chronic pain among individuals with Substance Use Disorders (SUDs) is a common and critically important problem that is rarely managed appropriately. The estimated rates of chronic pain in patients who are in SUD treatment are as high as 60 percent, with many patients reporting long-lasting and significant pain during treatment. The treatment of pain is complicated in those with SUDs because of the potential for abuse and diversion of many prescription pain medications. Furthermore, recent evidence suggests that untreated pain may undermine the effectiveness of standard treatments for SUDs. An important potential strategy is the use of cognitive behavioral therapy (CBT) to both manage pain and decrease substance use/misuse. Psychosocial interventions such as CBT have demonstrated efficacy for reducing pain and improving functioning in persons with a broad spectrum of pain-related problems, but have not been evaluated in those with SUDs. Thus, SUD treatment providers are left without successful and empirically-supported methods for treating the large number of patients with chronic pain who also have SUDs. The proposed study is a randomized controlled efficacy trial of a group-based intervention that integrates CBT for pain and SUDs compared to a Supportive Psychoeducation Control (SPC) group in a sample of patients in SUD treatment with co-occurring chronic pain. A total of 452 patients (226 male and 226 female) with current pain rated as moderate or greater will be recruited from a large residential SUD treatment facility. These participants will be randomly assigned to either a 4-week (8-session) group of integrated CBT for pain and SUDs or a 4-week (8-session) SPC group. All participants will be re-assessed immediately post-intervention completion (around 1-month) and at 3-, 6-, and 12- months after the intervention. The primary specific aims will focus on pain (level, tolerance and pain-related disability) and substance use (frequency of drug, alcohol and opioid medication misuse) outcomes. Secondary analyses will explore: 1) whether change in pain during the intervention mediates the effect of CBT on subsequent substance use/misuse; 2) other hypothesized mechanisms of action for the CBT intervention; and 3) the impact of the intervention on HIV risk behaviors and depressive symptoms. Mixed model regression analyses will be used for all primary aims, within each gender, to estimate between-group differences in changes in outcomes over time. Currently, treatment providers lack evidence-based interventions to address pain in individuals with SUDs. Improving the treatment of pain in patients with SUDs could have a wide-ranging impact not only on individuals' pain, but also on their substance use and quality of life. Knowledge generated in the proposed study is likely to have broad implications for the care of patients with pain and SUDs in many different healthcare settings.